package com.pkx.cloud.fse7.dms.emview.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pkx.cloud.fse7.dms.emview.entity.RpDmsTokenEmGrantView;
import com.pkx.cloud.fse7.dms.emview.service.RpDmsTokenEmGrantViewService;
import com.pkx.cloud.whzx.comn.ORpose;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

/**
 *  控制器
 *
 * @author zhangwh
 * @since 2020-10-16
 */
@RestController
@RequestMapping("/emview/rp-dms-token-em-grant-view")
@Api(value = "电梯楼层授权信息报表", tags = "电梯楼层授权信息报表")
@Slf4j
@ORpose
public class RpDmsTokenEmGrantViewController {

    @Autowired
    private RpDmsTokenEmGrantViewService rpDmsTokenEmGrantViewService;

    @ApiOperation("电梯楼层授权信息分页列表")
    @GetMapping("/page")
    public Page<RpDmsTokenEmGrantView> page(Page page, String issueStratDate, String issueEndDate, String staffName, String tokenId ) throws ParseException {
        return rpDmsTokenEmGrantViewService.pageList(page,issueStratDate,issueEndDate,staffName,tokenId);
    }

    @ApiOperation("电梯楼层授权信息列表")
    @GetMapping("/list")
    public List<RpDmsTokenEmGrantView> list(RpDmsTokenEmGrantView rpDmsTokenEmGrantView) {
        return rpDmsTokenEmGrantViewService.listByEntity(rpDmsTokenEmGrantView);
    }
}
